package com.ejuornal.action;

import javax.annotation.Resource;

import com.ejuornal.service.RoleService;
import com.ejuornal.service.impl.PermissionGroupServiceImpl;
import com.opensymphony.xwork2.ActionSupport;
/**
 * 项目名称：ejuornal    
 * 类名称：InitAction    
 * 类描述：    初始化Action
 * 创建人：chenchen    
 * 创建时间：Mar 16, 2013 1:18:42 PM    
 * 修改人：chenchen    
 * 修改时间：Mar 16, 2013 1:18:42 PM    
 * 修改备注：    
 * @version     
 *
 */
public class InitAction extends ActionSupport{
    private static final long serialVersionUID = -3652105551514269293L;
    private RoleService roleService;
    private PermissionGroupServiceImpl pgsi;

    public String execute() {
    	//角色添加
        roleService.batchUpdate();
       //权限组的添加
        pgsi.batchUpdate();
        //登录页面的图片默认为1
        
        return SUCCESS;
    }
    
    public RoleService getRoleService() {
        return roleService;
    }
    @Resource(name="roleService")
    public void setRoleService(RoleService roleService) {
        this.roleService = roleService;
    }

	public PermissionGroupServiceImpl getPgsi() {
		return pgsi;
	}
	@Resource(name="permissionService")
	public void setPgsi(PermissionGroupServiceImpl pgsi) {
		this.pgsi = pgsi;
	}
}
